{include file="admin/top.php" subject='moving'}
<div id="content">
    <div id="boxquery">
    <form method="get">
    	<input type="hidden" name="m" value="inventory" />
        <input type="hidden" name="s" value="moving.php" />
        <input type="hidden" name="uri" value="showAddMoving" />
        <input type="hidden" name="shopid" value="{$smarty.get.shopid}" />
        <input type="hidden" name="paperId" value="{$smarty.get.paperId}" />
        <input type="submit" id="search" value="查询" class="fr" />
        <li>
        <div style="line-height: 15px;float:left;">产品ID:&nbsp; </div>
        <textarea id="product_id" name="product_id" style="resize:horizontal;float:left;height:30px;">{$smarty.get.product_id}</textarea>
        </li>
    </form>
    </div>
    
    <form action="{$site_admin}m=inventory&s=moving.php&uri=settingProductList&paperId={$smarty.get.paperId}" method="post" >
    <table width="100%" border="0" cellspacing="0" cellpadding="0" id="lister">
      <tr id="title">
      	<td width="40"><input type="checkbox" class="checkall" ></td>
        <td width="40">SKU_ID</td>
        <td width="40">产品ID</td>
        <td>产品图片</td>
        <td>产品名称</td>
        <td>发货仓</td>
        <td width="160">供应商(负责人)</td>
        <td>单位</td>
        <td>采购单价</td>
        <td>货币单位</td>
        <td>预售数量</td>
        <td>实际库存</td>
        <td>虚拟库存</td>
        <td>预警数量</td>
        <td>主站状态</td>
      </tr>
      {stocks limit=20 pager=pager page=$segment.page order="id" productid=$smarty.get.product_id shopid=$smarty.get.shopid}
      <tr id="content">
      	<td><input type="checkbox" value="{$stocks.productid}" class="checkitem" name="chk[]" /></td>
        <td>{$stocks.productid}</td>
        <td>{$stocks.pid}</td>
        <td height="50">{if $stocks.product_pic}<img src="{$stocks.product_pic}" width="50" height="50" />{else}暂无图片{/if}</td>
        <td><a href="javascript:void(0);">{$stocks.pname}</a> {$stocks.spec}</td>
         <td>{$stocks.shop_name}&nbsp;</td>
        <td>
        {if !empty($stocks.suppliers)}
        {foreach from=$stocks.suppliers item=supplier}
        	<p>{$supplier.title}({if $supplier.classid}{classes id=$supplier.classid}{$classes.title}{/classes}{else}未指定{/if})</p>
        {/foreach}
        {else}未指定{/if}
        </td>
        <td>{$stocks.unit}</td>
        <td>{$stocks.pricebuy}&nbsp;</td>
        <td>{$stocks.currency_unit}&nbsp;</td>
        <td>{$stocks.wanttobuy}</td>
        <td>{$stocks.stocks}</td>
        <td>{$stocks.canbuyout}</td>
        <td>{$stocks.shopwarningnum}</td>
        <td>{if "0"===$stocks.status}<span style="color:gray">未送审</span>{/if}
            {if "-2"===$stocks.status}<span style="color:orange">已送审</span>{/if}
            {if "1"===$stocks.status}<span style="color:green">已上架</span>{/if}
            {if "2"===$stocks.status}<span style="color:blue">推荐</span>{/if}
            {if "-1"===$stocks.status}<span style="color:red">被驳回</span>{/if}
            {if "-3"===$stocks.status||"-9"===$stocks.status}<span style="color:#ccc">已下架</span>{/if}
        </td>
      </tr>
      {/stocks}
      {if $pager->rows==0}
      <tr id="content">
        <td colspan="20">&nbsp;</td>
      </tr>
      {/if}
      <tfoot>
            <tr>
                <td colspan="15">
	                <input type="hidden" name="action" value="saveProduct" />
                    <input type="submit" value="添加" />
                </td>
            </tr>
    </tfoot>
    </table>
    </form>
    <div id="pager" class="mt10">
        {if $pager}共{$pager->rows}条记录 第{$pager->pagecurrent}/{$pager->pages}页 {/if}
        {if $pager->current > 1}<a href="{url s1=1}">首页</a>{/if}
        {if $pager->current > 1}<a href="{url s1=$pager->current-1}">上页</a>{/if}
        {if $pager->current < $pager->pages}<a href="{url s1=$pager->current+1}">下页</a>{/if}
        {if $pager->current < $pager->pages}<a href="{url s1=$pager->pages}">尾页</a>{/if}
	</div>
</div>
{include file="admin/bottom.php"}
</body>
</html>
